#include <iostream>


void ex2_36()
{
  int a = 3, b = 4;
  decltype(a) c = a;
  decltype((b)) d = a;
  ++c;
  ++d;

  // a = 3, b = 4, c = 3, d = a
  // a = 4, b = 4, c = 4, d = 4
  std::cout << "a:" << a << " b:" << b << " c:" << c << " d:" << d << std::endl;
}

void ex2_37()
{
  int a = 3, b = 4;
  decltype(a) c = a;
  decltype(a = b) d = a;
  // a int 3
  // b int 4
  // c int = a 3
  // d int& a 3
  c = 5; // c = 5
  d = 8; // d: a = 8
  std::cout << "a:" << a << " b:" << b << " c:" << c << " d:" << d << std::endl;
}
int main(int argc, char *argv[])
{
  ex2_37();
  return 0;
}
